package org.jeecg.modules.demo.logics.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.demo.logics.entity.*;
import org.jeecg.modules.demo.logics.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;

/**
* @Description: 车辆表
* @Author: jeecg-boot
* @Date:   2021-09-29
* @Version: V1.0
*/
@Api(tags="首页数据接口")
@RestController
@RequestMapping("/logics/index")
@Slf4j
public class IndexDataController extends JeecgController<CarInfo, ICarInfoService>{
    @Autowired
    private IViewPkgNumService iViewPkgNumService;
    @Autowired
    private IViewPkgChukuService iViewPkgChukuService;
    @Autowired
    private IViewPkgRukuService iViewPkgRukuService;
    @Autowired
    private IViewOrderListService iViewOrderListService;
    @Autowired
    private IViewCarListService iViewCarListService;

//    @Autowired
//    private view view


    @GetMapping(value = "/get")
    public Result<?> getIndexData(){
        List<ViewPkgNum> list1=iViewPkgNumService.list();
        return Result.OK(list1);
    }

    @GetMapping(value = "/chuku")
    public Result<?> getChukuData(){
        List<ViewPkgChuku> list1=iViewPkgChukuService.list();
        return Result.OK(list1);
    }

    @GetMapping(value = "/ruku")
    public Result<?> getRukuData(){
        List<ViewPkgRuku> list1=iViewPkgRukuService.list();
        return Result.OK(list1);
    }
    @GetMapping(value = "/order")
    public Result<?> getOrderData(){
        List<ViewOrderList> list1=iViewOrderListService.list();
        return Result.OK(list1);
    }
    @GetMapping(value = "/care")
    public Result<?> getCarData(){
        List<ViewCarList> list1=iViewCarListService.list();
        return Result.OK(list1);
    }
//


}

